package pl.edu.mimuw.irs.rcp;

import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import pl.edu.mimuw.irs.rcp.controller.handler.ShowProperties;
import pl.edu.mimuw.irs.rcp.view.NavigationView;
import pl.edu.mimuw.irs.rcp.view.RolesView;

public class Perspective implements IPerspectiveFactory {

	public static final String ID = "pl.edu.mimuw.irs.perspective";
	
	public void createInitialLayout(IPageLayout layout) {
		/**String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		layout.setFixed(true);
		
		layout.addStandaloneView(GraphicalView.ID,  false, IPageLayout.LEFT, 1.0f, editorArea);*/
		/*String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		
		layout.addStandaloneView(PropertiesView.ID,  false, IPageLayout.LEFT, 0.25f, editorArea);
		IFolderLayout folder = layout.createFolder("messages", IPageLayout.TOP, 0.5f, editorArea);
		folder.addPlaceholder(GraphicalView.ID + ":*");
		folder.addView(GraphicalView.ID);
		*/
		//layout.getViewLayout(PropertiesView.ID).setCloseable(false);
		/*layout.addView(PropertiesView.ID, IPageLayout.BOTTOM,
				IPageLayout.RATIO_MIN, IPageLayout.ID_PROP_SHEET);*/
		
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(true);
		layout.setFixed(false);
		layout.addView(NavigationView.ID, IPageLayout.LEFT, 0.2f, editorArea);
		layout.addView(RolesView.ID, IPageLayout.TOP, 0.6f, NavigationView.ID);
		layout.addView(ShowProperties.PROPERTIES_ID, IPageLayout.BOTTOM, 0.8f, editorArea);
		//layout.addView(RequirementsView.ID, IPageLayout.RIGHT, 0.5f, ShowProperties.PROPERTIES_ID);
		//layout.addView("org.eclipse.jdt.ui.PackageExplorer", IPageLayout.LEFT, 0.2f,
		//		editorArea);
	}

}
